import time

from selenium import webdriver
from selenium.webdriver import DesiredCapabilities

options = webdriver.ChromeOptions()
options.binary_location = '/Applications/XXX.app/Contents/MacOS/XXX'

capabilities = DesiredCapabilities.CHROME.copy()
capabilities['browserName'] = 'electron'

driver = webdriver.Remote(desired_capabilities=capabilities,options=options,
                          command_executor="http://127.0.0.1:9515")

handles = driver.window_handles
driver.switch_to.window(handles[1])
time.sleep(3)
driver.find_element_by_xpath("/html/body/div/div/div/div[2]/div[2]/div[3]/a[1]").click()
